<?php

include '../phpFunctions/getPictureUrl2.php';

$url = getPictureUrls();

?>
<img src='' name='Rotating' id='Rotating1' width=100 height=100>

<script language='JavaScript'>
  var ImageArr1 = new Array('../Bildgalleri/Paintings/<?php print $url[0]?>','../Bildgalleri/Paintings/<?php print $url[1]?>','../Bildgalleri/Paintings/<?php print $url[2]?>','../Bildgalleri/Paintings/<?php print $url[3]?>','../Bildgalleri/Paintings/<?php print $url[4]?>');
  var ImageHolder1 = document.getElementById('Rotating1');

  function RotateImages(whichHolder,Start)
  {
  	var a = eval('ImageArr'+whichHolder);
  	var b = eval('ImageHolder'+whichHolder);
  	if(Start>=a.length)
  		Start=0;
  	b.src = a[Start];
  	window.setTimeout('RotateImages('+whichHolder+','+(Start+1)+')',3000);
  }

  RotateImages(1,0);
   </script>

